import React, { useEffect, useState } from 'react'
import { getAllMap } from './api'
export default function MetroMap() {
    const [list, setList] = useState<any>({})
    const render = async () => {
        const data = await getAllMap()
        console.log(data.data.data);
        setList(data.data.data)

    }
    useEffect(() => {
        render()
    }, [])
    if (list) {
        return <div>
            <img src={'http://124.93.196.45:10001/' + list.imgUrl} alt="" />
        </div>
    } else {
        return <div></div>
    }
}
